package exercise9;

import com.sun.org.apache.bcel.internal.generic.LADD;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollBar;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;

public class Exercise16_17 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        ScrollBar red=new ScrollBar();
        ScrollBar green=new ScrollBar();
        ScrollBar blue=new ScrollBar();
        ScrollBar opacity=new ScrollBar();

        GridPane gridPane=new GridPane();
        gridPane.add(new Label("红色"),0,0);
        gridPane.add(new Label("绿色"),0,1);
        gridPane.add(new Label("蓝色"),0,2);
        gridPane.add(new Label("透明"),0,3);
        gridPane.add(red,1,0);
        gridPane.add(green,1,1);
        gridPane.add(blue,1,2);
        gridPane.add(opacity,1,3);
        gridPane.setAlignment(Pos.BOTTOM_CENTER);
        gridPane.setHgap(5);

        Label text=new Label("测试用字");
        text.setAlignment(Pos.BOTTOM_CENTER);

        BorderPane pane=new BorderPane();
        pane.setBottom(gridPane);
        pane.setTop(text);

        primaryStage.setTitle("调色");
        primaryStage.setScene(new Scene(pane,300,300));
        primaryStage.show();


    }
}
